page_pilotinfo = (state={},action)->
  switch action.type
    when 'PILOT_INFO/GET_LIST_START'
      Object.assign {},state,{isLoading:true}
    when 'PILOT_INFO/GET_LIST_COMPLETED'
      Object.assign {},state,
        pilotInfo:action.payload.pilotInfo
        isLoading:false
        completed:true
    when 'PILOT_INFO/REFRESH_LIST_START'
      Object.assign {},state,{
        pilotInfo:{}
        isLoading:false
        refreshing:true
      }
    when 'PILOT_INFO/REFRESH_LIST_COMPLETED'
      Object.assign {},state,{
        pilotInfo:action.payload.pilotInfo
        isLoading:false
        refreshing:false
        lastFetchTime:action.payload.lastFetchTime
        completed:true
      }
    else
      state

module.exports = page_pilotinfo
